﻿using SqlSugar;

namespace orm.sqlsugar.api.Entities
{
    /// <summary>
    /// 用户实体类
    /// </summary>
    [SplitTable(SplitType.Day)] // 按天分表
    [SugarTable("User_{year}{month}{day}")]
    public class User
    {
        [SugarColumn(IsPrimaryKey = true)]
        public long Id { get; set; }

        public string Name { get; set; } = null!;

        [SplitField] // 标记分表字段
        public DateTime CreateTime { get; set; }
    }
}
